3.13.91 \(\int \frac {(a+b \arctan (c x)) (d+e \log (1+c^2 x^2))}{x} \, dx\) [1291]

3.13.91.1 Optimal result
3.13.91.2 Mathematica [F]
3.13.91.3 Rubi [A] (verified)
3.13.91.4 Maple [C] (warning: unable to verify)
3.13.91.5 Fricas [F]
3.13.91.6 Sympy [F]
3.13.91.7 Maxima [F]
3.13.91.8 Giac [F(-1)]
3.13.91.9 Mupad [F(-1)]

3.13.91.1 Optimal result

Integrand size = 26, antiderivative size = 282 \[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=a d \log (x)+\frac {1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac {1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x)+\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,i c x)-\frac {1}{2} a e \operatorname {PolyLog}\left (2,-c^2 x^2\right )+i b e \log (1-i c x) \operatorname {PolyLog}(2,1-i c x)-i b e \log (1+i c x) \operatorname {PolyLog}(2,1+i c x)-i b e \operatorname {PolyLog}(3,1-i c x)+i b e \operatorname {PolyLog}(3,1+i c x) \]

output
a*d*ln(x)+1/2*I*b*e*ln(I*c*x)*ln(1-I*c*x)^2-1/2*I*b*e*ln(-I*c*x)*ln(1+I*c* 
x)^2+1/2*I*b*d*polylog(2,-I*c*x)-1/2*I*b*e*(ln(1-I*c*x)+ln(1+I*c*x)-ln(c^2 
*x^2+1))*polylog(2,-I*c*x)-1/2*I*b*d*polylog(2,I*c*x)+1/2*I*b*e*(ln(1-I*c* 
x)+ln(1+I*c*x)-ln(c^2*x^2+1))*polylog(2,I*c*x)-1/2*a*e*polylog(2,-c^2*x^2) 
+I*b*e*ln(1-I*c*x)*polylog(2,1-I*c*x)-I*b*e*ln(1+I*c*x)*polylog(2,1+I*c*x) 
-I*b*e*polylog(3,1-I*c*x)+I*b*e*polylog(3,1+I*c*x)
 
3.13.91.2 Mathematica [F]

\[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx \]

input
Integrate[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x,x]
 
output
Integrate[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x, x]
 
3.13.91.3 Rubi [A] (verified)

Time = 1.17 (sec) , antiderivative size = 241, normalized size of antiderivative = 0.85, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {5550, 5355, 2838, 5548, 2838, 5546, 2843, 2881, 2821, 5355, 2838, 7143}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(a+b \arctan (c x)) \left (e \log \left (c^2 x^2+1\right )+d\right )}{x} \, dx\)

\(\Big \downarrow \) 5550

\(\displaystyle e \int \frac {(a+b \arctan (c x)) \log \left (c^2 x^2+1\right )}{x}dx+d \int \frac {a+b \arctan (c x)}{x}dx\)

\(\Big \downarrow \) 5355

\(\displaystyle e \int \frac {(a+b \arctan (c x)) \log \left (c^2 x^2+1\right )}{x}dx+d \left (\frac {1}{2} i b \int \frac {\log (1-i c x)}{x}dx-\frac {1}{2} i b \int \frac {\log (i c x+1)}{x}dx+a \log (x)\right )\)

\(\Big \downarrow \) 2838

\(\displaystyle e \int \frac {(a+b \arctan (c x)) \log \left (c^2 x^2+1\right )}{x}dx+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

\(\Big \downarrow \) 5548

\(\displaystyle e \left (a \int \frac {\log \left (c^2 x^2+1\right )}{x}dx+b \int \frac {\arctan (c x) \log \left (c^2 x^2+1\right )}{x}dx\right )+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

\(\Big \downarrow \) 2838

\(\displaystyle e \left (b \int \frac {\arctan (c x) \log \left (c^2 x^2+1\right )}{x}dx-\frac {1}{2} a \operatorname {PolyLog}\left (2,-c^2 x^2\right )\right )+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

\(\Big \downarrow \) 5546

\(\displaystyle e \left (-\frac {1}{2} a \operatorname {PolyLog}\left (2,-c^2 x^2\right )+b \left (-\left (\left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right ) \int \frac {\arctan (c x)}{x}dx\right )+\frac {1}{2} i \int \frac {\log ^2(1-i c x)}{x}dx-\frac {1}{2} i \int \frac {\log ^2(i c x+1)}{x}dx\right )\right )+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

\(\Big \downarrow \) 2843

\(\displaystyle e \left (-\frac {1}{2} a \operatorname {PolyLog}\left (2,-c^2 x^2\right )+b \left (-\left (\left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right ) \int \frac {\arctan (c x)}{x}dx\right )+\frac {1}{2} i \left (2 i c \int \frac {\log (i c x) \log (1-i c x)}{1-i c x}dx+\log (i c x) \log ^2(1-i c x)\right )-\frac {1}{2} i \left (\log (-i c x) \log ^2(1+i c x)-2 i c \int \frac {\log (-i c x) \log (i c x+1)}{i c x+1}dx\right )\right )\right )+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

\(\Big \downarrow \) 2881

\(\displaystyle e \left (-\frac {1}{2} a \operatorname {PolyLog}\left (2,-c^2 x^2\right )+b \left (-\left (\left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right ) \int \frac {\arctan (c x)}{x}dx\right )+\frac {1}{2} i \left (\log (i c x) \log ^2(1-i c x)-2 \int \frac {\log (i c x) \log (1-i c x)}{1-i c x}d(1-i c x)\right )-\frac {1}{2} i \left (\log (-i c x) \log ^2(1+i c x)-2 \int \frac {\log (-i c x) \log (i c x+1)}{i c x+1}d(i c x+1)\right )\right )\right )+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

\(\Big \downarrow \) 2821

\(\displaystyle e \left (-\frac {1}{2} a \operatorname {PolyLog}\left (2,-c^2 x^2\right )+b \left (-\left (\left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right ) \int \frac {\arctan (c x)}{x}dx\right )+\frac {1}{2} i \left (\log (i c x) \log ^2(1-i c x)-2 \left (\int \frac {\operatorname {PolyLog}(2,1-i c x)}{1-i c x}d(1-i c x)-\operatorname {PolyLog}(2,1-i c x) \log (1-i c x)\right )\right )-\frac {1}{2} i \left (\log (-i c x) \log ^2(1+i c x)-2 \left (\int \frac {\operatorname {PolyLog}(2,i c x+1)}{i c x+1}d(i c x+1)-\operatorname {PolyLog}(2,i c x+1) \log (1+i c x)\right )\right )\right )\right )+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

\(\Big \downarrow \) 5355

\(\displaystyle e \left (-\frac {1}{2} a \operatorname {PolyLog}\left (2,-c^2 x^2\right )+b \left (-\left (\left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right ) \left (\frac {1}{2} i \int \frac {\log (1-i c x)}{x}dx-\frac {1}{2} i \int \frac {\log (i c x+1)}{x}dx\right )\right )+\frac {1}{2} i \left (\log (i c x) \log ^2(1-i c x)-2 \left (\int \frac {\operatorname {PolyLog}(2,1-i c x)}{1-i c x}d(1-i c x)-\operatorname {PolyLog}(2,1-i c x) \log (1-i c x)\right )\right )-\frac {1}{2} i \left (\log (-i c x) \log ^2(1+i c x)-2 \left (\int \frac {\operatorname {PolyLog}(2,i c x+1)}{i c x+1}d(i c x+1)-\operatorname {PolyLog}(2,i c x+1) \log (1+i c x)\right )\right )\right )\right )+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

\(\Big \downarrow \) 2838

\(\displaystyle e \left (-\frac {1}{2} a \operatorname {PolyLog}\left (2,-c^2 x^2\right )+b \left (\frac {1}{2} i \left (\log (i c x) \log ^2(1-i c x)-2 \left (\int \frac {\operatorname {PolyLog}(2,1-i c x)}{1-i c x}d(1-i c x)-\operatorname {PolyLog}(2,1-i c x) \log (1-i c x)\right )\right )-\frac {1}{2} i \left (\log (-i c x) \log ^2(1+i c x)-2 \left (\int \frac {\operatorname {PolyLog}(2,i c x+1)}{i c x+1}d(i c x+1)-\operatorname {PolyLog}(2,i c x+1) \log (1+i c x)\right )\right )-\left (\left (\frac {1}{2} i \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i \operatorname {PolyLog}(2,i c x)\right ) \left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right )\right )\right )\right )+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

\(\Big \downarrow \) 7143

\(\displaystyle e \left (-\frac {1}{2} a \operatorname {PolyLog}\left (2,-c^2 x^2\right )+b \left (-\left (\left (\frac {1}{2} i \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i \operatorname {PolyLog}(2,i c x)\right ) \left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right )\right )+\frac {1}{2} i \left (\log (i c x) \log ^2(1-i c x)-2 (\operatorname {PolyLog}(3,1-i c x)-\operatorname {PolyLog}(2,1-i c x) \log (1-i c x))\right )-\frac {1}{2} i \left (\log (-i c x) \log ^2(1+i c x)-2 (\operatorname {PolyLog}(3,i c x+1)-\operatorname {PolyLog}(2,i c x+1) \log (1+i c x))\right )\right )\right )+d \left (a \log (x)+\frac {1}{2} i b \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b \operatorname {PolyLog}(2,i c x)\right )\)

input
Int[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x,x]
 
output
d*(a*Log[x] + (I/2)*b*PolyLog[2, (-I)*c*x] - (I/2)*b*PolyLog[2, I*c*x]) + 
e*(-1/2*(a*PolyLog[2, -(c^2*x^2)]) + b*(-((Log[1 - I*c*x] + Log[1 + I*c*x] 
 - Log[1 + c^2*x^2])*((I/2)*PolyLog[2, (-I)*c*x] - (I/2)*PolyLog[2, I*c*x] 
)) + (I/2)*(Log[I*c*x]*Log[1 - I*c*x]^2 - 2*(-(Log[1 - I*c*x]*PolyLog[2, 1 
 - I*c*x]) + PolyLog[3, 1 - I*c*x])) - (I/2)*(Log[(-I)*c*x]*Log[1 + I*c*x] 
^2 - 2*(-(Log[1 + I*c*x]*PolyLog[2, 1 + I*c*x]) + PolyLog[3, 1 + I*c*x]))) 
)
 

3.13.91.3.1 Defintions of rubi rules used

rule 2821
Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b 
_.))^(p_.))/(x_), x_Symbol] :> Simp[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c 
*x^n])^p/m), x] + Simp[b*n*(p/m)   Int[PolyLog[2, (-d)*f*x^m]*((a + b*Log[c 
*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 
0] && EqQ[d*e, 1]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

rule 2843
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_. 
)*(x_)), x_Symbol] :> Simp[Log[e*((f + g*x)/(e*f - d*g))]*((a + b*Log[c*(d 
+ e*x)^n])^p/g), x] - Simp[b*e*n*(p/g)   Int[Log[(e*(f + g*x))/(e*f - d*g)] 
*((a + b*Log[c*(d + e*x)^n])^(p - 1)/(d + e*x)), x], x] /; FreeQ[{a, b, c, 
d, e, f, g, n, p}, x] && NeQ[e*f - d*g, 0] && IGtQ[p, 1]
 

rule 2881
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log 
[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*(g_.))*((k_.) + (l_.)*(x_))^(r_.), x_Sym 
bol] :> Simp[1/e   Subst[Int[(k*(x/d))^r*(a + b*Log[c*x^n])^p*(f + g*Log[h* 
((e*i - d*j)/e + j*(x/e))^m]), x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, 
 f, g, h, i, j, k, l, n, p, r}, x] && EqQ[e*k - d*l, 0]
 

rule 5355
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] 
 + (Simp[I*(b/2)   Int[Log[1 - I*c*x]/x, x], x] - Simp[I*(b/2)   Int[Log[1 
+ I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]
 

rule 5546
Int[(ArcTan[(c_.)*(x_)]*Log[(f_.) + (g_.)*(x_)^2])/(x_), x_Symbol] :> Simp[ 
(Log[f + g*x^2] - Log[1 - I*c*x] - Log[1 + I*c*x])   Int[ArcTan[c*x]/x, x], 
 x] + (Simp[I/2   Int[Log[1 - I*c*x]^2/x, x], x] - Simp[I/2   Int[Log[1 + I 
*c*x]^2/x, x], x]) /; FreeQ[{c, f, g}, x] && EqQ[g, c^2*f]
 

rule 5548
Int[(Log[(f_.) + (g_.)*(x_)^2]*(ArcTan[(c_.)*(x_)]*(b_.) + (a_)))/(x_), x_S 
ymbol] :> Simp[a   Int[Log[f + g*x^2]/x, x], x] + Simp[b   Int[Log[f + g*x^ 
2]*(ArcTan[c*x]/x), x], x] /; FreeQ[{a, b, c, f, g}, x]
 

rule 5550
Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*(Log[(f_.) + (g_.)*(x_)^2]*(e_.) + 
(d_)))/(x_), x_Symbol] :> Simp[d   Int[(a + b*ArcTan[c*x])/x, x], x] + Simp 
[e   Int[Log[f + g*x^2]*((a + b*ArcTan[c*x])/x), x], x] /; FreeQ[{a, b, c, 
d, e, f, g}, x]
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 
3.13.91.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 10.84 (sec) , antiderivative size = 5420, normalized size of antiderivative = 19.22

method result size
risch \(\text {Expression too large to display}\) \(5420\)

input
int((a+b*arctan(c*x))*(d+e*ln(c^2*x^2+1))/x,x,method=_RETURNVERBOSE)
 
output
result too large to display
 
3.13.91.5 Fricas [F]

\[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )} {\left (e \log \left (c^{2} x^{2} + 1\right ) + d\right )}}{x} \,d x } \]

input
integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x,x, algorithm="fricas")
 
output
integral((b*d*arctan(c*x) + a*d + (b*e*arctan(c*x) + a*e)*log(c^2*x^2 + 1) 
)/x, x)
 
3.13.91.6 Sympy [F]

\[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int \frac {\left (a + b \operatorname {atan}{\left (c x \right )}\right ) \left (d + e \log {\left (c^{2} x^{2} + 1 \right )}\right )}{x}\, dx \]

input
integrate((a+b*atan(c*x))*(d+e*ln(c**2*x**2+1))/x,x)
 
output
Integral((a + b*atan(c*x))*(d + e*log(c**2*x**2 + 1))/x, x)
 
3.13.91.7 Maxima [F]

\[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )} {\left (e \log \left (c^{2} x^{2} + 1\right ) + d\right )}}{x} \,d x } \]

input
integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x,x, algorithm="maxima")
 
output
a*d*log(x) + 1/2*integrate(2*(b*d*arctan(c*x) + (b*e*arctan(c*x) + a*e)*lo 
g(c^2*x^2 + 1))/x, x)
 
3.13.91.8 Giac [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\text {Timed out} \]

input
integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x,x, algorithm="giac")
 
output
Timed out
 
3.13.91.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int \frac {\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )\,\left (d+e\,\ln \left (c^2\,x^2+1\right )\right )}{x} \,d x \]

input
int(((a + b*atan(c*x))*(d + e*log(c^2*x^2 + 1)))/x,x)
 
output
int(((a + b*atan(c*x))*(d + e*log(c^2*x^2 + 1)))/x, x)